public class AdapterTest{
	public static <TY extends Number> TY add(TY a, TY b){
		return (TY)Double.valueOf(a.doubleValue()+b.doubleValue());
	}
	public static void main(String args[]){
		Polygon p[]=new Polygon[3];
		
		p[0]=new RegularPolygon();
		p[1]=new Rectangle();
		p[2]=new AdaptedCircle(new Circle());
		
		for(Polygon pp:p){
			pp.draw();
		}    
		System.out.print(add(100d,200d));
	}
}   